files_name = './pi.txt'
with open(files_name) as file_object:
    content = file_object.read()
    print(file_object)
    print(content.rstrip())

with open('./read_file/pi.txt') as file:
    content = file.read()
    print(content)

with open(files_name) as files:
    content = files.readline()
    print(content)
print(content)

with open(files_name) as file_object:
    for line in file_object:
        # print(line)
        print(line.rstrip())

with open(files_name) as files:
    lines = files.readlines()

pi_str = ''
for line in lines:
    pi_str += line.rstrip().strip()

print(pi_str)
print(len(pi_str))
print(len(lines))